#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
char str[100];
void out(char *s)
{
    int len=strlen(s);len--;
	for(int i=len;i>=0;i--)
	{
		if(s[i]=='0')len--;
		else break;
	}
	for(int i=len;i>=0;i--)
	{
		cout<<s[i];
	}
}
int main()
{
    freopen("reverse.in","r",stdin);
	 freopen("reverse.out","w",stdout);
	 cin>>str;
	 if(str[0]=='0'&&str[1]==0)cout<<0;
	 else if(str[0]=='-'){cout<<'-';out(str+1);}
	 else out(str);
	 fclose(stdin);
	 fclose(stdout);
}
